<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>ll_newscms</title>

    <script src="__STATIC__/jquery-2.js"></script>
    <script src="__STATIC__/layui/layui.js"></script>
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    {include file="public/header" /}
    {include file="public/left" /}
    <style>
        .layui-table-cell{
            height: 33px;
        }
    </style>



    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <fieldset class="layui-elem-field layui-field-title"  style="margin-top: 50px;">
                <legend>申请列表</legend>
            </fieldset>
            <table class="layui-hide" id="newlist"   ></table>



            <script>
                layui.use('table', function(){
                    var table = layui.table;

                    table.render({
                        elem: '#newlist'

                        ,url: "{:url('apply/applylistjson')}"
                        ,cols: [[
                            {type:'checkbox',width:'2%'}
                            ,{field:'ll_apid', width:'10%', title: 'ID', sort: true}
                            ,{field:'ll_username', width:'10%', title: '用户'}
                            ,{field:'ll_typename', width: '10%', title: '申请身份' }
                            ,{field:'ll_msg', width:'30%', title: '留言'}
                            ,{field:'ll_aptime', width:'10%', title: '申请时间',sort: true}
                            ,{field:'ll_ptime', width:'10%', title: '通过时间'}
                            ,{field:'operation', width:'18%', title: '操作',templet: '#operation'}
                        ]]
                        ,page: true
                    });
                });
            </script>
            <script type="text/html" id="operation">
                {{#  if(d.ll_pass == 1){ }}
                <span class="layui-btn layui-btn-normal layui-btn-sm "    >已通过</span>
                {{#  } }}

                {{#  if(d.ll_pass == 2){ }}
                <a class="layui-btn layui-btn-normal layui-btn-sm" onclick=" return confirm('你真的要pass吗')"  href="{:url('apply/pass' )}?{literal}ll_apid={{d.ll_apid}} {/literal}" >通过</a>
                <a class="layui-btn layui-btn-danger layui-btn-sm"  onclick=" return confirm('你真的要拒绝这个申请吗')" href="{:url('apply/refused' )}?{literal}ll_apid={{d.ll_apid}} {/literal}" >拒绝</a>

                {{#  } }}

                {{#  if(d.ll_pass == 3){ }}
                <span class="layui-btn layui-btn-danger layui-btn-sm "    >已拒绝</span>

                {{#  } }}

            </script>
        </div>
    </div>


</div>

<script>





    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
    $('#logout').click(function (e) {
        e.preventDefault();
        layui.use('layer', function(){
            var layer = layui.layer;

            layer.confirm('你真的要退出吗？',['yes','no'],function () {
                location.href="{:url('login/logout')}";
            },function () {
                
            })
        });
    })
    
    





</script>

</body>
</html>